<div class="view">
<table>
	<caption>基本信息</caption>
	<tr>
		<th>档案号</th>
		<td><?php echo $tm['file_no']; ?></td>
		<th>建档日期</th>
		<td><?php echo $tm['file_create_date']; ?></td>
		<th>案件类型</th>
		<td><?php echo $tm['case_type']; ?></td>
	</tr>
	<tr>
		<th>申请人名称（中文）</th>
        <td colspan="5"><?php echo $tm['c_name']; ?></td>
	</tr>
	<tr>
		<th>申请人名称（英文）</th>
        <td colspan="5"><?php echo $tm['c_name_en']; ?></td>
	</tr>
	<tr>
		<th>申请人地址（中文）</th>
		<td colspan="5"><?php echo $tm['c_addr']; ?></td>
	</tr>
	<tr>
		<th>申请人地址（英文）</th>
		<td colspan="5"><?php echo $tm['c_addr_en']; ?></td>
	</tr>
	<tr>
		<th>证照编号</th>
		<td colspan="3"><?php echo $tm['c_licence_number']; ?></td>
		<th>国家</th>
		<td><?php echo $tm['c_country']; ?></td>
	</tr>
	<tr>
		<th>其他申请人信息</th>
		<td colspan="5"><?php echo $tm['other_client_info']; ?></td>
	</tr>
	<tr>
		<th>代理公司</th>
		<td colspan="3"><?php echo $tm['agency']; ?></td>
		<th>代理人</th>
		<td><?php echo $tm['agent']; ?></td>
	</tr>
	<tr>
		<th>合作所</th>
		<td colspan="3"><?php echo $tm['partner']; ?></td>
		<th>联系人</th>
		<td><?php echo $tm['ct_contact']; ?></td>
	</tr>
	<tr>
		<th>电话</th>
		<td><?php echo $tm['ct_telephone']; ?></td>
		<th>传真</th>
		<td><?php echo $tm['ct_fax']; ?></td>
		<th>邮箱</th>
		<td><?php echo $tm['ct_email']; ?></td>
	</tr>
	<tr>
		<th>邮寄地址</th>
		<td colspan="3"><?php echo $tm['ct_mailing_addr']; ?></td>
		<th>QQ号</th>
		<td><?php echo $tm['ct_qq']; ?></td>
	</tr>
</table>

<table>
	<caption>费用统计</caption>
	<tr>
		<th>官费</th>
        <td><?php echo number_format($tm['government_fee'], 2); ?></td>
		<th>代理费</th>
		<td><?php echo number_format($tm['agency_fee'], 2); ?></td>
		<th>总费用</th>
		<td><?php echo number_format($tm['total_fee'], 2); ?></td>
	</tr>
	<tr>
		<th>是否收款</th>
		<td><?php echo $tm['is_collected']; ?></td>
		<th>收款日期</th>
		<td><?php echo $tm['collection_date']; ?></td>
		<th>收款账户</th>
		<td><?php echo $tm['collection_account']; ?></td>
	</tr>
	<tr>
		<th>是否开票</th>
		<td><?php echo $tm['is_billed']; ?></td>
		<th>开票日期</th>
		<td><?php echo $tm['billing_date']; ?></td>
		<th>开票金额</th>
		<td><?php echo $tm['billing_amount']; ?></td>
	</tr>
	<tr>
		<th>开票人</th>
		<td><?php echo $tm['drawer']; ?></td>
		<th>确认人</th>
		<td><?php echo $tm['confirmor']; ?></td>
		<th>官方扣款日期</th>
		<td><?php echo $tm['checkoff_date']; ?></td>
	</tr>
</table>

<?php if ($dynamic_view == CTV_APPLICATION): ?>
<table>
	<caption>申请</caption>
	<tr>
		<th>商标名称</th>
		<td colspan="3"><?php echo $tm['tm_name']; ?></td>
		<th>标样</th>
        <td><a href="<?php echo base_url(decode_upload_path($tm['ap_sample_path'])); ?>" class="image-link">
            <?php echo $tm['ap_sample_name']; ?></a></td>
	</tr>
	<tr>
		<th>类别</th>
		<td><?php echo $tm['tm_class']; ?></td>
		<th>商标种类</th>
		<td><?php echo $tm['ap_trademark_type']; ?></td>
		<th>指定颜色</th>
		<td><?php echo $tm['ap_color']; ?></td>
	</tr>
	<tr>
		<th>指定商品</th>
		<td colspan="5"><?php echo $tm['ap_item']; ?></td>
	</tr>
	<tr>
		<th>申请日期</th>
		<td colspan="3"><?php echo $tm['application_date']; ?></td>
		<th>申请号</th>
		<td><?php echo $tm['application_no']; ?></td>
	</tr>
	<tr>
		<th>公告日期</th>
		<td><?php echo $tm['ap_announcement_date']; ?></td>
		<th>注册日期</th>
		<td><?php echo $tm['ap_registration_date']; ?></td>
		<th>续展日期</th>
		<td><?php echo $tm['ap_renewal_date']; ?></td>
	</tr>
	<tr>
		<th>结果</th>
		<td colspan="5"><?php echo $tm['result']; ?></td>
	</tr>
</table>
<?php elseif ($dynamic_view == CTV_TRANSFER): ?>
<table>
	<caption>转让</caption>
	<tr>
		<th>申请日期</th>
		<td><?php echo $tm['application_date']; ?></td>
		<th>申请号</th>
		<td><?php echo $tm['application_no']; ?></td>
		<th>完成日期</th>
		<td><?php echo $tm['tr_finish_date']; ?></td>
	</tr>
	<tr>
		<th>商标名称</th>
		<td colspan="3"><?php echo $tm['tm_name']; ?></td>
		<th>类别</th>
		<td><?php echo $tm['tm_class']; ?></td>
	</tr>
	<tr>
		<th>转让前名称</th>
		<td colspan="5"><?php echo $tm['tr_prev_name']; ?></td>
	</tr>
	<tr>
		<th>转让前地址</th>
		<td colspan="5"><?php echo $tm['tr_prev_addr']; ?></td>
	</tr>
	<tr>
		<th>结果</th>
		<td colspan="5"><?php echo $tm['result']; ?></td>
	</tr>
</table>
<?php elseif ($dynamic_view == CTV_CHANGE): ?>
<table>
	<caption>变更</caption>
	<tr>
		<th>申请日期</th>
		<td><?php echo $tm['application_date']; ?></td>
		<th>申请号</th>
		<td><?php echo $tm['application_no']; ?></td>
		<th>完成日期</th>
		<td><?php echo $tm['ch_finish_date']; ?></td>
	</tr>
	<tr>
		<th>商标名称</th>
		<td colspan="3"><?php echo $tm['tm_name']; ?></td>
		<th>类别</th>
		<td><?php echo $tm['tm_class']; ?></td>
	</tr>
	<tr>
		<th>变更前名称</th>
		<td colspan="5"><?php echo $tm['ch_prev_name']; ?></td>
	</tr>
	<tr>
		<th>变更前地址</th>
		<td colspan="5"><?php echo $tm['ch_prev_addr']; ?></td>
	</tr>
	<tr>
		<th>结果</th>
		<td colspan="5"><?php echo $tm['result']; ?></td>
	</tr>
</table>
<?php elseif ($dynamic_view == CTV_RENEWAL): ?>
<table>
	<caption>续展</caption>
	<tr>
		<th>申请日期</th>
		<td><?php echo $tm['application_date']; ?></td>
		<th>申请号</th>
		<td><?php echo $tm['application_no']; ?></td>
		<th>完成日期</th>
		<td><?php echo $tm['re_finish_date']; ?></td>
	</tr>
	<tr>
		<th>商标名称</th>
		<td colspan="3"><?php echo $tm['tm_name']; ?></td>
		<th>类别</th>
		<td><?php echo $tm['tm_class']; ?></td>
	</tr>
	<tr>
		<th>有效期至</th>
		<td colspan="5"><?php echo $tm['re_to_date']; ?></td>
	</tr>
	<tr>
		<th>结果</th>
		<td colspan="5"><?php echo $tm['result']; ?></td>
	</tr>
</table>
<?php elseif ($dynamic_view == CTV_OTHER): ?>
<table>
	<caption>其他申请</caption>
	<tr>
		<th>申请日期</th>
		<td><?php echo $tm['application_date']; ?></td>
		<th>申请号</th>
		<td><?php echo $tm['application_no']; ?></td>
		<th>完成日期</th>
		<td><?php echo $tm['ot_finish_date']; ?></td>
	</tr>
	<tr>
		<th>商标名称</th>
		<td colspan="3"><?php echo $tm['tm_name']; ?></td>
		<th>类别</th>
		<td><?php echo $tm['tm_class']; ?></td>
	</tr>
	<tr>
		<th>结果</th>
		<td colspan="5"><?php echo $tm['result']; ?></td>
	</tr>
</table>
<?php else: ?>
<table>
	<caption>案件</caption>
	<tr>
		<th>商标名称</th>
		<td><?php echo $tm['tm_name']; ?></td>
		<th>申请号</th>
		<td><?php echo $tm['application_no']; ?></td>
		<th>类别</th>
		<td><?php echo $tm['tm_class']; ?></td>
	</tr>
	<tr>
		<th>首次申请日期</th>
		<td><?php echo $tm['ca_first_apply_date']; ?></td>
		<th>补充申请时间</th>
		<td><?php echo $tm['ca_next_apply_date']; ?></td>
		<th>撰写人</th>
		<td><?php echo $tm['ca_writer']; ?></td>
	</tr>
	<tr>
		<th>结果</th>
		<td colspan="5"><?php echo $tm['result']; ?></td>
	</tr>
</table>
<?php endif; ?>

<table>
	<caption>限时提醒</caption>
    <?php foreach ($rms as $rm): ?>
	<tr>
		<th>文件名称</th>
		<td><?php echo $rm['rm_filename']; ?></td>
		<th>收文日期</th>
		<td><?php echo $rm['rm_receive_first_date']; ?></td>
		<th>截止日期</th>
		<td><?php echo $rm['rm_receive_last_date']; ?></td>
	</tr>
	<tr>
		<th>处理日期</th>
		<td><?php echo $rm['rm_operate_date']; ?></td>
		<th>处理结果</th>
		<td><?php echo $rm['rm_operate_result']; ?></td>
		<th>经办人</th>
        <td><?php echo $rm['rm_operator']; ?></td>
	</tr>
    <?php endforeach; ?>
</table>

<table>
	<caption>官方文件</caption>
    <?php foreach ($docs as $doc): ?>
	<tr>
		<th>文件名称</th>
		<td><?php echo $doc['doc_name']; ?></td>
		<th>录入日期</th>
		<td><?php echo $doc['doc_entry_date']; ?></td>
		<th>附件</th>
        <td><a href="<?php echo base_url(decode_upload_path($doc['doc_path'])); ?>" class="image-link"><?php echo $doc['doc_original_name']; ?></a></td>
	</tr>
    <?php endforeach; ?>
</table>
</div>

<script>
    $(function() {
        $(".image-link").magnificPopup({type:'image'});
    });
</script>